package com.mujin.keji.collectionsystem.module.login.dto;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.PrimaryKey;

/**
 * Created by Administrator on 2018/5/4.
 */
@Entity(tableName = "t_user_info")
public class UserDto {

    //主键 自增长
    @PrimaryKey(autoGenerate = true)
    //表名
    @ColumnInfo(name = "id")
    private Long id;
    @ColumnInfo(name = "sex")
    private String sex;
    @ColumnInfo(name = "username")
    private String username;
    @ColumnInfo(name = "password")
    private String password;
    // 指示 Room 需要忽略的字段或方法
    @Ignore
    private String age;

    @Override
    public String toString() {
        return "UserDto{" +
                "id=" + id +
                ", sex='" + sex + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", age='" + age + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }
}
